<?php

require_once RP .'inc/Smarty/Smarty.class.php';

class Templater extends Smarty {

	public function __construct($template_dir) {
		parent::__construct();

		$this->template_dir = $template_dir;
		$this->compile_dir = RP . 'tmp/smarty/templates_c/';
		$this->cache_dir = RP . 'tmp/smarty/cache/';
		$this->config_dir = RP . 'inc/configs/';

		$this->caching = isset($_REQUEST['cache']) ? $_REQUEST['cache'] : App::config()->data('smarty_caching');
		$this->cache_lifetime = App::config()->data('smarty_cache_lifetime');

		$this->debugging = isset($_REQUEST['smarty_debug']) && $_REQUEST['smarty_debug'] ? true : App::config()->data("smarty_debug");
	}

}